import Vue from 'vue'
import VueRouter from 'vue-router'

const Home= () =>import('../views/Home/Home.vue');
const Order= () =>import('../views/Order/Order.vue');
const Profile= () =>import('../views/Profile/Profile.vue');
const Search= () =>import('../views/Search/Search.vue');
const Container= () =>import('../views/Container.vue');

Vue.use(VueRouter);

const routes = [
  {path: '/',redirect:'/home'},
  {path: '/container',name: 'container', component: Container,children:[
      {path: '/home',name:'home',component:Home},
      {path: '/order',name:'Order',component:Order},
      {path: '/profile',name:'Profile',component:Profile},
      {path: '/search',name:'Search',component:Search}
    ]},
]

const router = new VueRouter({
  routes
})

export default router
